﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevExpress.Xpo;
using Zero.POCO;
using Zero.POCO.Compagne;

namespace Zero.DataLayer.Donnees
{
    public class XpoCompaign : XPBaseObject
    {
          public XpoCompaign()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

          public XpoCompaign(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }


        private Guid _Oid;
        [Key]
         public Guid Oid
        {
            get { return _Oid; }
            set { SetPropertyValue("Oid", ref _Oid, value); }
        }




        private XpoMarque _Marque;
        [Aggregated, Association("XpoCompaign-XpoMarque")]
        public XpoMarque Marque
        {
            get { return _Marque; }
            set { SetPropertyValue("Marque", ref _Marque, value); }
        }

        private XpoFilter _Filter;
        [Aggregated, Association("XpoCompaign-XpoFilter")]
        public XpoFilter Filter
        {
            get { return _Filter; }
            set { SetPropertyValue("Filter", ref _Filter, value); }
        }


        private XpoAnnonceur _Annonceur;
        [Aggregated, Association("XpoCompaign-XpoAnnonceur")]
        public XpoAnnonceur Annonceur
        {
            get { return _Annonceur; }
            set { SetPropertyValue("Annonceur", ref _Annonceur, value); }
        }

        private string _Nom;
        public string Nom
        {
            get { return _Nom; }
            set { SetPropertyValue("Nom", ref _Nom, value); }
        }





        private Annonceur _TypeCompaign;
        public Annonceur TypeCompaign
        {
            get { return _TypeCompaign; }
            set { SetPropertyValue("TypeCompaign", ref _TypeCompaign, value); }
        }


        private Vague _Vague;
        [Aggregated, Association("Vague-XpoCompaign")]
        public Vague Vague
        {
            get { return _Vague; }
            set { SetPropertyValue("Vague", ref _Vague, value); }
        }

        [Aggregated, Association("XpoCompaign-PlanTvs")]
        public XPCollection<XpoPlanTv> PlanTvs
        {
            get { return GetCollection<XpoPlanTv>("PlanTvs"); }
        }


        [Aggregated, Association("XpoCompaign-PlanRadios")]
        public XPCollection<XpoPlanRadio> PlanRadios
        {
            get { return GetCollection<XpoPlanRadio>("PlanRadios"); }
        }


        [Aggregated, Association("XpoCompaign-PlanPresses")]
        public XPCollection<XpoPlanPresse> PlanPresses
        {
            get { return GetCollection<XpoPlanPresse>("PlanPresses"); }
        }



    }
}
